<!DOCTYPE html>
<html>
    <head>
        
    </head>
    <body>
        输入钉钉直播的LiveUUID: 
        <input type="text" id="input"/>
        <br/>
        刷赞数量*100 (一次一百赞) :
        <input type="text" id="num"/><br/>
        <button type="button" id="button">运行</button>
        <span id="times"></span>
        <script>
			var button=document.getElementById("button");
            var uuid=document.getElementById("input");
            var span=document.getElementById("times")
            button.onclick=function(){
                for (let index = 1; index <= parseInt(document.getElementById("num").value); index++) {
                    var httpRequest = new XMLHttpRequest();
                    httpRequest.open("GET","https://lv.dingtalk.com/interaction/createLike?uuid="+uuid.value+"&count=100",true);
                    httpRequest.send();
                    httpRequest.onreadystatechange = function () {
                        if (httpRequest.readyState == 4 && httpRequest.status == 200) {
                            var content = httpRequest.responseText;
                            if(content!="success") content="错误: ";
                            else content="成功: "
                        }
                        span.textContent=content+index+"/"+parseInt(document.getElementById("num").value);
                    };
                    
                    
                }
                
            }
        </script>
    </body>
</html>